package com.jmp.feign;

import one.stand.fallback.CrmFallBack;
import one.stand.model.BusinessCardModel;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "crm-service", fallback = CrmFallBack.class, decode404 = true)
public interface CrmFegin {



    /**
     * 录入跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/addFollow")
    ResultModel<Boolean> addFollow(@RequestBody FollowRecordRequest request);

    /**
     * 获取跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/getFollowList")
    ResultModel<List<FollowRecordResponse>> getFollowList(@RequestBody FollowRecordRequest request);

    /**
     * 获取公司员工
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffList")
    ResultModel<Map<String, Object>> getCompanyStaffList(@RequestBody BusinessCardRequest request);

    /**
     * 修改用户名片欢迎语
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/updateCardWelcomeSpeech")
    ResultModel<Boolean> updateCardWelcomeSpeech(@RequestBody BusinessCardRequest request);

    /**
     * 获取员工详细信息
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyUserInfo")
    ResultModel<BusinessCardModel> getCompanyUserInfo(@RequestBody BusinessCardRequest request);

    /**
     * 得到名片海报
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCardPoster")
    ResultModel<List<String>> getCardPoster(@RequestBody BusinessCardRequest request);


    /**
     * 录入企业员工本月目标
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/addMoneyNum")
    ResultModel addMoneyNum(@RequestBody UserTaskRequest request);

    /**
     * 企业员工移交客户
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/moveCustomer")
    ResultModel moveCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取公司信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/invitation")
    ResultModel<CompanyResponse> invitation(@RequestBody CompanyRequest request);

    /**
     * 个人企业
     * @param request
     * @return
     */
    @PostMapping("company/getCompany")
    ResultModel<CompanyResponse> getCompany(@RequestBody CompanyRequest request);

    @PostMapping("company/getCompanyId")
    ResultModel<CompanyResponse> getCompanyId(@RequestBody CompanyRequest request);

    /**
     * 查询公司信息(用于下拉列表查询)
     * @param request
     * @return
     */
    @PostMapping("company/getCompanyAllInfo")
    ResultModel getCompanyAllInfo(@RequestBody CompanyRequest request);

    /**
     * 添加/修改公司动态/文章
     *
     * @param request
     * @return
     */
    @PostMapping("company/addDynamicInfo")
    ResultModel addDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * 删除公司动态/文章
     *
     * @param request
     * @return
     */
    @PostMapping("company/delDynamicInfo")
    ResultModel delDynamicInfo(@RequestBody DynamicRequest request);

    /**
     * 添加/修改公司官网信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/addWebsiteInfo")
    ResultModel addWebsiteInfo(@RequestBody WebsiteRequest request);

    /**
     * 查询公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectCompanyRecruit")
    ResultModel selectCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 添加/修改公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/addCompanyRecruit")
    ResultModel addCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 添加招聘HR电话
     *
     * @param request
     * @return
     */
    @PostMapping("company/addHrPhone")
    ResultModel addHrPhone(@RequestBody CompanyRequest request);

    /**
     * 删除公司招聘信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/delCompanyRecruit")
    ResultModel delCompanyRecruit(@RequestBody CompanyRecruitRequest request);

    /**
     * 添加标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/addLable")
    ResultModel<Long> addLable(@RequestBody CompanyCustomerLableRequest request);
    /**
     * 删除标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/delLable")
    ResultModel<Boolean> delLable(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 获取客户标签树
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/getTree")
    ResultModel<List<CompanyCustomerLableResponse>> getTree(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 修改标签
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/updLable")
    ResultModel<Boolean> updLable(@RequestBody CompanyCustomerLableRequest request);


    /**
     * 存为客户
     *
     * @param request
     * @return
     */
    @PostMapping("customer/addCustomer")
    ResultModel<Boolean> addCustomer(@RequestBody CustomerRequest request);

    /**
     * 客户类型分组统计
     *
     * @param request
     * @return
     */
    @PostMapping("customer/countCustomer")
    ResultModel<List<CustomerResponse>> countCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户列表
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomer")
    ResultModel<List<CustomerResponse>> getCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户信息
     *
     * @param cardId
     * @return
     */
    @PostMapping("customer/getCustomerInfo")
    ResultModel<GetCustomerInfoResponse> getCustomerInfo(@RequestParam("cardId") Long cardId);

    /**
     * 手动创建客户
     *
     * @return
     */
    @PostMapping("customer/manualAdd")
    ResultModel<Boolean> manualAdd(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @return
     */
    @PostMapping("customer/updCustomer")
    ResultModel<Boolean> updCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入成交金额
     *
     * @return
     */
    @PostMapping("/customer/inputDealMoney")
    ResultModel<Boolean> inputDealMoney(@RequestBody InputDealMoneyRequest request);

    /**
     * 获取行业
     *
     * @param
     * @return
     */
    @PostMapping("industry/getList")
    ResultModel<List<IndustryResponse>> getList();

    /**
     * CRM端PC端首页统计
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getPcCount")
    ResultModel getPcCount(@RequestBody SeeRecordRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodSpecInfo")
    ResultModel addGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodsInfo")
    ResultModel delGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodSpecInfo")
    ResultModel delGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 修改订单退款状态1未申请，2退款申请中，3退款成功
     */
    @PostMapping("orders/updateRefundState")
    ResultModel updateRefundState(@RequestBody OrdersRequest request);

    /**
     * 退款异步回调
     */
    @PostMapping("orders/backRefund")
    String backRefund(@RequestParam("request") String request);

    /**
     * 公司财务统计-总收入
     *
     * @param request
     * @return
     */
    @PostMapping("finance/getGrossIncome")
    ResultModel getGrossIncome(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-商城流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceMall")
    ResultModel<Map<String, Object>> selectFinanceMall(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-成交流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceDeal")
    ResultModel<Map<String, Object>> selectFinanceDeal(@RequestBody FinanceRequest request);

    /**
     * 公司财务统计-公司流水
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectFinanceCompany")
    ResultModel<Map<String, Object>> selectFinanceCompany(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-客户人数
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectCustomerNum")
    ResultModel<Map<String, Object>> selectCustomerNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-订单量
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectOrderNum")
    ResultModel<Map<String, Object>> selectOrderNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-互动频率
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectInteractionNum")
    ResultModel<Map<String, Object>> selectInteractionNum(@RequestBody FinanceRequest request);

    /**
     * 公司销售排行-成交率区间
     *
     * @param request
     * @return
     */
    @PostMapping("finance/selectDelNum")
    ResultModel<Map<String, Object>> selectDelNum(@RequestBody FinanceRequest request);

    /**
     * 修改客户类型
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerState")
    ResultModel<String> updCustomerState(@RequestBody CustomerRequest request);

    /**
     * 修改客户标签
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerLabel")
    ResultModel<String> updCustomerLabel(@RequestBody CustomerRequest request);

    /**
     * 获取成交记录
     * @param request
     * @return
     */
    @PostMapping("inputDealMoney/getInputDealList")
    ResultModel<List<InputDealMoneyResponse>> getInputDealList(@RequestBody InputDealMoneyRequest request);

    /**
     * 企业客户下拉框
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerList")
    ResultModel<List<CustomerResponse>> getCustomerList(@RequestBody CustomerRequest request);

    /**
     * 客户兴趣统计
     * @param request
     * @return
     */
    @PostMapping("seeRecord/countCustomerAnalysis")
    ResultModel countCustomerAnalysis(@RequestBody SeeRecordRequest request);

    /**
     * 个人数据统计/企业数据统计
     *
     * @return
     */
    @RequestMapping("dataCount/personalData")
    ResultModel personalData(@RequestBody FinanceRequest request);

    /**
     * 近7日成交额
     *
     * @return
     */
    @RequestMapping("dataCount/sevenData")
    ResultModel sevenData(@RequestBody  FinanceRequest request);

    /**
     * 数据汇总
     *
     * @return
     */
    @RequestMapping("dataCount/dataSummary")
    ResultModel dataSummary(@RequestBody  FinanceRequest request);

    /**
     * 成交率漏斗
     *
     * @return
     */
    @RequestMapping("dataCount/turnoverRate")
    ResultModel turnoverRate(@RequestBody  FinanceRequest request);

    /**
     * 新增客户数
     *
     * @return
     */
    @RequestMapping("dataCount/newCustomerNum")
    ResultModel newCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 咨询客户数
     *
     * @return
     */
    @RequestMapping("dataCount/followCustomerNum")
    ResultModel followCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 跟进客户数
     *
     * @return
     */
    @RequestMapping("dataCount/consultationNum")
    ResultModel consultationNum(@RequestBody  FinanceRequest request);

    /**
     * 近15日客户活跃数
     *
     * @return
     */
    @RequestMapping("dataCount/activeCustomerNum")
    ResultModel activeCustomerNum(@RequestBody  FinanceRequest request);

    /**
     * 添加商品转发记录
     *
     * @return
     */
    @PostMapping("dataCount/addGoodsForwardRecord")
    ResultModel addGoodsForwardRecord(@RequestBody GoodsForwardRecordRequest request);

    /**
     * 添加文章转发记录
     *
     * @return
     */
    @PostMapping("dataCount/addDynamicForwardRecord")
    ResultModel addDynamicForwardRecord(@RequestBody DynamicForwardRecordRequest request);

    /**
     * 转移产品
     */
    @PostMapping("goods/transferGoods")
    ResultModel transferGoods(@RequestBody GoodsRequest request);

    /**
     * 清空微信推送次数
     */
    @PostMapping("/businessCard/delFormId")
    ResultModel<Boolean> delFormId(@RequestBody BusinessCardRequest request);


    @PostMapping("notice/selectEffectiveList")
    ResultModel<List<NoticeResponse>> selectEffectiveList(@RequestBody NoticeRequest request);
}
